/****

    activequant - activestocks.eu

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

	
	contact  : contact@activestocks.eu
    homepage : http://www.activestocks.eu

 ****/
package org.activequant.math.regression;

/**
 * Container object for holding regression results<br/>
 * Holds the following associated variables:
 * <ul>
 * <li>f(double)</li>
 * <li>r(double)</li>
 * <li>coefs(Coefficient[])</li>
 * </ul>
 * <b>History:</b><br> 
 * - [31.05.2006] Created (Erik Nijkamp)<br>
 * - [16.07.2008] Added some more documentation (Ulrich Staudinger)<br>
 * 
 * 
 * @author Erik Nijkamp
 * @author Ulrich Staudinger
 */
public class Result {
	/**
	 * private double r, f;
	 */
    private double r, f;
    /**
     * private Coefficient[] coefs = null;
     */
    private Coefficient[] coefs = null;
    /**
     * constructs a Result using the given coefs(Coefficient[]), r(double) and f(double) to set its associated coefs(Coefficient[]), r(double) and f(double)
     * @param coefs
     * @param r
     * @param f
     */
    public Result(Coefficient[] coefs, double r, double f) {
        this.r = r;
        this.f = f;
        this.coefs = coefs;
    }

    /**
     * returns the associated coefs(Coefficient[])
     * @return returns the coefficients of a specific regression. 
     */
    public Coefficient[] getCoefficients() {
        return coefs;
    }

    /**
     * returns the associated r(double)
     * @return returns r.
     */
    public double getR() {
        return r;
    }

    /**
     * returns the associated f(double)
     * @return returns f.
     */
    public double getF() {
        return f;
    }

}
